package controller;

import java.util.Map;

public class UserPermit extends BaseAction{
    private String name;
    private String pwd;

    public String login(){
        System.out.println(name+"这里是name的值");
        if (name.equals("admin")&&pwd.equals("admin")){
            getMapSession().put("name",name);
            return "addUserTrue";
        }
        getMapSession().put("message","<a>账号或者密码不对</a>");
        return "error";
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }
}
